package com.ldk.framework.enums;

/**
 * 支付类型枚举
 * @author xiangwl
 *
 */
public enum PayType {
	Alipay("支付宝","alipay", 1),
	Tenpay("微信支付","tenpay", 2),
	Balance("余额支付","balance", 3),
	UnionPay("银联支付","unionpay", 4)
	;
	
	private PayType(String name, String type, int id){
		this.name = name;
		this.type = type;
		this.id = id;
	}
	private String name;
	private String type;
	private int    id;
	
	public String getName() {
		return name;
	}
	public String getType() {
		return type;
	}
	public int getId() {
		return id;
	}
	
	public static String getPayName(int payId){
		if(payId == PayType.Alipay.getId())
			return PayType.Alipay.getName();
		else if(payId == PayType.Tenpay.getId()){
			return PayType.Tenpay.getName();
		}
		else{
			return PayType.Balance.getName();
		}
	}
}
